package com.xiaoyu.awakening.ai.search.context;


import com.alibaba.ttl.TransmittableThreadLocal;
import com.xiaoyu.awakening.ai.control.entity.AwkSearchContent;

/**
 * WxMinProgramTokenContext
 *
 * @author wangxiaoyu
 * @since v1.0
 */
public class AwkSearchThreadLocal {
    private static final TransmittableThreadLocal<AwkSearchContext<AwkSearchContent>> content = new TransmittableThreadLocal<>();

    public static AwkSearchContext<AwkSearchContent> getContext() {
        return content.get();
    }

    public static void remove() {
        content.remove();
    }

    public static void setLocal(AwkSearchContext<AwkSearchContent> ctx) {
        content.set(ctx);
    }

    private AwkSearchThreadLocal() {
    }
}
